<ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
					xmlns:controls="using:MyToolkit.Controls" 
					xmlns:converters="using:MyToolkit.Converters" 
					xmlns:Paging="using:MyToolkit.Paging"
					xmlns:data="http://schemas.microsoft.com/winfx/2006/xaml/presentation">

	<converters:NotConverter x:Key="nc" />
	<converters:VisibilityConverter x:Key="vc" />

    <converters:LongListSelectorBackgroundConverter x:Key="LongListSelectorBackgroundConverter"/>
    <converters:ColorConverter x:Key="ColorConverter"/>

    <Style TargetType="controls:LongListSelector">
        <Setter Property="ItemTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock Text="{Binding}" Margin="0,0,0,15"
                               FontSize="{StaticResource TextStyleExtraLargePlusFontSize}" 
                               FontFamily="{StaticResource PhoneFontFamilySemiLight}" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:LongListSelector">
                    <SemanticZoom>
                        <SemanticZoom.Resources>
                            <CollectionViewSource Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ItemsSource, Mode=TwoWay}"
                                                  x:Key="ViewSource" IsSourceGrouped="True" />
                        </SemanticZoom.Resources>
                        <SemanticZoom.ZoomedInView>
                            <!-- ContinuumNavigationTransitionInfo.ExitElementContainer="True"  -->
                            <ListView x:Name="ListView" IsHoldingEnabled="True" 
                                      ItemsSource="{Binding Source={StaticResource ViewSource}}" ItemTemplate="{TemplateBinding ItemTemplate}">
                                <ListView.GroupStyle>
                                    <GroupStyle HidesIfEmpty="True">
                                        <GroupStyle.HeaderTemplate>
                                            <DataTemplate>
                                                <Border Background="{StaticResource PhoneAccentBrush}" Margin="0,0,0,10"
                                                        BorderBrush="{StaticResource PhoneAccentBrush}" Width="50" Height="50">
                                                    <TextBlock Text="{Binding Title}" 
                                                               FontFamily="{StaticResource PhoneFontFamilySemiLight}" 
                                                               Foreground="White" FontSize="40" Padding="5,0,0,2" 
                                                               HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
                                                </Border>
                                            </DataTemplate>
                                        </GroupStyle.HeaderTemplate>
                                    </GroupStyle>
                                </ListView.GroupStyle>
                            </ListView>
                        </SemanticZoom.ZoomedInView>
                        <SemanticZoom.ZoomedOutView>
                            <GridView Background="{Binding Source={StaticResource PhoneBackgroundColor}, 
                                                           Converter={StaticResource ColorConverter}, 
                                                           ConverterParameter='alpha:BF'}" 
                                      HorizontalContentAlignment="Center" Padding="0,10,0,0"
                                      ItemsSource="{Binding Source={StaticResource ViewSource}, Path=CollectionGroups}">
                                <GridView.ItemTemplate>
                                    <DataTemplate>
                                        <Border Background="{Binding Group, Converter={StaticResource LongListSelectorBackgroundConverter}}" 
                                                Width="80" Height="80" Margin="5,10,5,0">
                                            <TextBlock Text="{Binding Group.Title}" FontSize="44" Padding="10,0,0,0"
                                                       FontFamily="{StaticResource PhoneFontFamilySemiBold}"
                                                       Foreground="{StaticResource PhoneForegroundBrush}"
                                                       HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
                                        </Border>
                                    </DataTemplate>
                                </GridView.ItemTemplate>
                            </GridView>
                        </SemanticZoom.ZoomedOutView>
                    </SemanticZoom>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="controls:WatermarkedTextBox">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:WatermarkedTextBox">
					<TextBox x:Name="textBox" />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

    <Style TargetType="controls:ScrollableItemsControl">
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel VirtualizationMode="Standard" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ItemsControl">
                    <ScrollViewer x:Name="ScrollViewer">
                        <ItemsPresenter />
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="controls:DataGrid">
        <Setter Property="HeaderBackground" Value="{StaticResource ListBoxItemDisabledForegroundThemeBrush}" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:DataGrid">
					<Grid Background="{TemplateBinding Background}">
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto" />
							<RowDefinition Height="*" />
						</Grid.RowDefinitions>

                        <Grid Grid.Row="0" Background="{TemplateBinding HeaderBackground}" Height="50" x:Name="ColumnHeaders">
                            <!-- HACK: Needed so that column DPs are working when adding columns in code only. -->
                            <ContentPresenter>
                                <controls:DataGridTextColumn />
                            </ContentPresenter>
                        </Grid>
                        <controls:MtListBox BorderThickness="0" Grid.Row="1" ItemContainerStyle="{TemplateBinding RowStyle}"
											HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
                                            Foreground="{StaticResource ApplicationForegroundThemeBrush}"
											Style="{StaticResource TransparentListBox}" Margin="0" x:Name="Rows" />
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="HeaderTemplate">
			<Setter.Value>
				<DataTemplate>
					<Grid Background="Transparent">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="Auto" />
							<ColumnDefinition Width="*" />
						</Grid.ColumnDefinitions>
                        <ContentPresenter Grid.Column="0" VerticalAlignment="Center" FontSize="26.667" Margin="15,0,15,0" Content="{data:Binding Header}" />
						<StackPanel Grid.Column="1" Visibility="{Binding IsSelected, Converter={StaticResource vc}}" 
									VerticalAlignment="Center" HorizontalAlignment="Left">
							<Path Data="M5,0 L0,10 L10,10 Z" Fill="White" Visibility="{Binding IsAscending, Converter={StaticResource vc}}"/>
							<Path Data="M0,0 L5,10 L10,0 Z" Fill="White" Visibility="{Binding IsAscending, Converter={StaticResource nc}}"/>
						</StackPanel>
					</Grid>
				</DataTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="CellTemplate">
			<Setter.Value>
				<DataTemplate>
                    <ContentPresenter Margin="10,0,0,5" Content="{Binding}" />
                </DataTemplate>
			</Setter.Value>
		</Setter>
	</Style>
    
	<Style TargetType="controls:ImageButton">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:ImageButton">
					<StackPanel Orientation="Horizontal" x:Name="container" Background="Transparent">
                        <ContentPresenter x:Name="content" VerticalAlignment="Center" />
						<TextBlock x:Name="header" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Header}"
								   Margin="15,0,0,0" FontSize="36" FontWeight="SemiLight" VerticalAlignment="Center"
								   Visibility="{Binding ElementName=header, Path=Text, Converter={StaticResource vc}}" />
					</StackPanel>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="TransparentListBox" TargetType="ListBox">
		<Setter Property="Foreground" Value="{StaticResource ListBoxForegroundThemeBrush}"/>
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="BorderBrush" Value="{StaticResource ListBoxBorderThemeBrush}"/>
		<Setter Property="BorderThickness" Value="{StaticResource ListBoxBorderThemeThickness}"/>
		<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
		<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
		<Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled"/>
		<Setter Property="ScrollViewer.IsHorizontalRailEnabled" Value="True"/>
		<Setter Property="ScrollViewer.VerticalScrollMode" Value="Enabled"/>
		<Setter Property="ScrollViewer.IsVerticalRailEnabled" Value="True"/>
		<Setter Property="ScrollViewer.ZoomMode" Value="Disabled"/>
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="TabNavigation" Value="Once"/>
		<Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
		<Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
		<Setter Property="ItemsPanel">
			<Setter.Value>
				<ItemsPanelTemplate>
					<VirtualizingStackPanel/>
				</ItemsPanelTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="ListBox">
					<Border x:Name="LayoutRoot" BorderBrush="{TemplateBinding BorderBrush}" 
							BorderThickness="{TemplateBinding BorderThickness}" 
							Background="{TemplateBinding Background}">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="LayoutRoot">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxDisabledForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused"/>
								<VisualState x:Name="Unfocused"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<ScrollViewer x:Name="ScrollViewer" HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" 
											  HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
											  IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" 
											  IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" 
											  Padding="{TemplateBinding Padding}" TabNavigation="{TemplateBinding TabNavigation}" 
											  VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" 
											  VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" 
											  ZoomMode="{TemplateBinding ScrollViewer.ZoomMode}">
							<ItemsPresenter/>
						</ScrollViewer>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="controls:MtListBox">
		<Setter Property="Foreground" Value="{StaticResource ListBoxForegroundThemeBrush}"/>
		<Setter Property="Background" Value="Transparent"/>
		<Setter Property="BorderBrush" Value="{StaticResource ListBoxBorderThemeBrush}"/>
		<Setter Property="BorderThickness" Value="{StaticResource ListBoxBorderThemeThickness}"/>
		<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
		<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
		<Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled"/>
		<Setter Property="ScrollViewer.IsHorizontalRailEnabled" Value="True"/>
		<Setter Property="ScrollViewer.VerticalScrollMode" Value="Enabled"/>
		<Setter Property="ScrollViewer.IsVerticalRailEnabled" Value="True"/>
		<Setter Property="ScrollViewer.ZoomMode" Value="Disabled"/>
		<Setter Property="IsTabStop" Value="False"/>
		<Setter Property="TabNavigation" Value="Once"/>
		<Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}"/>
		<Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}"/>
		<Setter Property="ItemsPanel">
			<Setter.Value>
				<ItemsPanelTemplate>
					<VirtualizingStackPanel/>
				</ItemsPanelTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:MtListBox">
					<Border x:Name="LayoutRoot" BorderBrush="{TemplateBinding BorderBrush}" 
							BorderThickness="{TemplateBinding BorderThickness}" 
							Background="{TemplateBinding Background}">
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="LayoutRoot">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="LayoutRoot">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ListBoxDisabledForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused"/>
								<VisualState x:Name="Unfocused"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<ScrollViewer x:Name="ScrollViewer" HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" 
											  HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
											  IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" 
											  IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" 
											  Padding="{TemplateBinding Padding}" TabNavigation="{TemplateBinding TabNavigation}" 
											  VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" 
											  VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" 
											  ZoomMode="{TemplateBinding ScrollViewer.ZoomMode}">
							<ItemsPresenter/>
						</ScrollViewer>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="controls:MtPivot">
        <Setter Property="SelectedBrush" Value="#FFFFFFFF" />
        <Setter Property="UnselectedBrush" Value="#7FFFFFFF" />
		<Setter Property="HeaderTemplate">
			<Setter.Value>
				<DataTemplate>
                    <TextBlock Text="{Binding Header}" FontSize="56" FontWeight="Light" Margin="0,-10,30,30" />
				</DataTemplate>
			</Setter.Value>
		</Setter>
        <Setter Property="Template">
            <Setter.Value>
				<ControlTemplate TargetType="controls:MtPivot">
					<Grid Background="Transparent">
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto" />
							<RowDefinition Height="*" />
						</Grid.RowDefinitions>

                        <controls:MtListBox x:Name="List" Margin="0" BorderThickness="0" Grid.Row="0" 
                                            ItemTemplate="{TemplateBinding HeaderTemplate}"
                                            IsEnabled="{TemplateBinding IsHeaderEnabled}"
											HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
											ScrollViewer.HorizontalScrollBarVisibility="Hidden"
											ScrollViewer.HorizontalScrollMode="Auto"
											ScrollViewer.VerticalScrollMode="Disabled"
											ScrollViewer.VerticalScrollBarVisibility="Disabled"
											Style="{StaticResource TransparentListBox}">

                            <controls:MtListBox.Resources>
                                <controls:ProxyElement x:Key="SelectedBrush" Tag="{TemplateBinding SelectedBrush}" />
                                <controls:ProxyElement x:Key="UnselectedBrush" Tag="{TemplateBinding UnselectedBrush}" /> 
                            </controls:MtListBox.Resources>

                            <controls:MtListBox.ItemsPanel>
								<ItemsPanelTemplate>
									<VirtualizingStackPanel Orientation="Horizontal" Background="Transparent" />
								</ItemsPanelTemplate>
							</controls:MtListBox.ItemsPanel>

                            <controls:MtListBox.ItemContainerStyle>
								<Style TargetType="ListBoxItem">
									<Setter Property="Background" Value="Transparent"/>
									<Setter Property="TabNavigation" Value="Local"/>
									<Setter Property="Padding" Value="0"/>
									<Setter Property="HorizontalContentAlignment" Value="Left"/>
									<Setter Property="Template">
										<Setter.Value>
											<ControlTemplate TargetType="ListBoxItem">
												<Border x:Name="LayoutRoot" BorderBrush="{TemplateBinding BorderBrush}" 
                                                        BorderThickness="{TemplateBinding BorderThickness}" 
                                                        Background="{TemplateBinding Background}">
													<VisualStateManager.VisualStateGroups>
														<VisualStateGroup x:Name="SelectionStates">
															<VisualState x:Name="Unselected">
																<Storyboard>
																	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Source={StaticResource UnselectedBrush}, Path=Tag}"/>
                                                                    </ObjectAnimationUsingKeyFrames>
																</Storyboard>
															</VisualState>
															<VisualState x:Name="Selected">
																<Storyboard>
																	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Source={StaticResource SelectedBrush}, Path=Tag}"/>
                                                                    </ObjectAnimationUsingKeyFrames>
																</Storyboard>
															</VisualState>
															<VisualState x:Name="SelectedUnfocused">
																<Storyboard>
																	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Source={StaticResource SelectedBrush}, Path=Tag}"/>
                                                                    </ObjectAnimationUsingKeyFrames>
																</Storyboard>
															</VisualState>
															<VisualState x:Name="SelectedDisabled">
																<Storyboard>
																	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Source={StaticResource SelectedBrush}, Path=Tag}"/>
                                                                    </ObjectAnimationUsingKeyFrames>
																</Storyboard>
															</VisualState>
															<VisualState x:Name="SelectedPointerOver">
                                                                <Storyboard>
                                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Source={StaticResource SelectedBrush}, Path=Tag}"/>
                                                                    </ObjectAnimationUsingKeyFrames>
                                                                </Storyboard>
                                                            </VisualState>
															<VisualState x:Name="SelectedPressed">
																<Storyboard>
																	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                                                        <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Source={StaticResource SelectedBrush}, Path=Tag}"/>
                                                                    </ObjectAnimationUsingKeyFrames>
																</Storyboard>
															</VisualState>
														</VisualStateGroup>
														<VisualStateGroup x:Name="FocusStates">
															<VisualState x:Name="Focused">
																<Storyboard>
																	<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualWhite"/>
																	<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualBlack"/>
																</Storyboard>
															</VisualState>
															<VisualState x:Name="Unfocused"/>
															<VisualState x:Name="PointerFocused"/>
														</VisualStateGroup>
													</VisualStateManager.VisualStateGroups>
                                                    
													<Grid x:Name="InnerGrid" Background="Transparent">
														<Rectangle x:Name="PressedBackground" Opacity="0"/>
														<ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" 
                                                                          ContentTransitions="{TemplateBinding ContentTransitions}" 
																		  Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                                          Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
														
                                                        <Rectangle x:Name="FocusVisualWhite" Opacity="0" StrokeDashOffset=".5" StrokeEndLineCap="Square" StrokeDashArray="1,1"/>
														<Rectangle x:Name="FocusVisualBlack" Opacity="0" StrokeDashOffset="1.5" StrokeEndLineCap="Square" StrokeDashArray="1,1"/>
													</Grid>
												</Border>
											</ControlTemplate>
										</Setter.Value>
									</Setter>
								</Style>
							</controls:MtListBox.ItemContainerStyle>
						</controls:MtListBox>
                        
						<Grid x:Name="Grid" VerticalAlignment="Stretch" Grid.Row="1"
						      HorizontalAlignment="Stretch" Background="Transparent">
							<Grid.Resources>
								<Storyboard x:Name="Story">
									<DoubleAnimation From="30" To="0" Storyboard.TargetName="Translate" 
													 Storyboard.TargetProperty="X" Duration="00:00:00.80">
										<DoubleAnimation.EasingFunction>
											<ExponentialEase EasingMode="EaseOut" Exponent="6" />
										</DoubleAnimation.EasingFunction>
									</DoubleAnimation>
								</Storyboard>
							</Grid.Resources>
							<Grid.RenderTransform>
								<TranslateTransform x:Name="Translate"/>
							</Grid.RenderTransform>
						</Grid>
					</Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="controls:FadingImage">
		<Setter Property="Stretch" Value="UniformToFill" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:FadingImage">
                    <Grid x:Name="canvas" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
						<Image Opacity="0" Stretch="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Stretch}" />
						<Image Opacity="0" Stretch="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Stretch}" />
					</Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="Paging:MtFrame">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Paging:MtFrame">
                    <Frame x:Name="Frame" 
						   ContentTransitions="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ContentTransitions}" 
                           Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

	<Style TargetType="controls:AppBarToggleButton">
		<Setter Property="Foreground" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
		<Setter Property="VerticalAlignment" Value="Stretch"/>
		<Setter Property="FontFamily" Value="Segoe UI Symbol"/>
		<Setter Property="FontWeight" Value="Normal"/>
		<Setter Property="FontSize" Value="20"/>
		<Setter Property="AutomationProperties.ItemType" Value="App Bar Button"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="ToggleButton">
					<Grid x:Name="RootGrid" Width="100" Background="Transparent">
						<StackPanel VerticalAlignment="Top" Margin="0,12,0,11">
							<Grid Width="40" Height="40" Margin="0,0,0,5" HorizontalAlignment="Center">
								<TextBlock x:Name="BackgroundGlyph" Text="&#xE0A8;" FontFamily="Segoe UI Symbol" FontSize="53.333" Margin="-4,-19,0,0" Foreground="{StaticResource AppBarItemBackgroundThemeBrush}"/>
								<TextBlock x:Name="OutlineGlyph" Text="&#xE0A7;" FontFamily="Segoe UI Symbol" FontSize="53.333" Margin="-4,-19,0,0"/>
								<ContentPresenter x:Name="Content" HorizontalAlignment="Center" Margin="-1,-1,0,0" VerticalAlignment="Center"/>
							</Grid>
							<TextBlock
                                x:Name="TextLabel"
                                Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Header}"
                                Foreground="{StaticResource AppBarItemForegroundThemeBrush}"
                                Margin="0,0,2,0"
                                FontSize="12"
                                TextAlignment="Center"
                                Width="88"
                                MaxHeight="32"
                                TextTrimming="WordEllipsis"
                                Style="{StaticResource BasicTextStyle}"/>
						</StackPanel>
						<Rectangle
                                x:Name="FocusVisualWhite"
                                IsHitTestVisible="False"
                                Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
                                StrokeEndLineCap="Square"
                                StrokeDashArray="1,1"
                                Opacity="0"
                                StrokeDashOffset="1.5"/>
						<Rectangle
                                x:Name="FocusVisualBlack"
                                IsHitTestVisible="False"
                                Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
                                StrokeEndLineCap="Square"
                                StrokeDashArray="1,1"
                                Opacity="0"
                                StrokeDashOffset="0.5"/>

						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="ApplicationViewStates">
								<VisualState x:Name="FullScreenLandscape"/>
								<VisualState x:Name="Filled"/>
								<VisualState x:Name="FullScreenPortrait">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Width">
											<DiscreteObjectKeyFrame KeyTime="0" Value="60"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Snapped">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Width">
											<DiscreteObjectKeyFrame KeyTime="0" Value="60"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="PointerOver">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPointerOverBackgroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPointerOverForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPressedForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unchecked"/>
								<VisualState x:Name="Checked">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPressedForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused">
									<Storyboard>
										<DoubleAnimation
                                                Storyboard.TargetName="FocusVisualWhite"
                                                Storyboard.TargetProperty="Opacity"
                                                To="1"
                                                Duration="0"/>
										<DoubleAnimation
                                                Storyboard.TargetName="FocusVisualBlack"
                                                Storyboard.TargetProperty="Opacity"
                                                To="1"
                                                Duration="0"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unfocused" />
								<VisualState x:Name="PointerFocused" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="controls:AppBarButton">
		<Setter Property="Foreground" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
		<Setter Property="VerticalAlignment" Value="Stretch"/>
		<Setter Property="FontFamily" Value="Segoe UI Symbol"/>
		<Setter Property="FontWeight" Value="Normal"/>
		<Setter Property="FontSize" Value="20"/>
		<Setter Property="AutomationProperties.ItemType" Value="App Bar Button"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Button">
					<Grid x:Name="RootGrid" Width="100" Background="Transparent">
						<StackPanel VerticalAlignment="Top" Margin="0,12,0,11">
							<Grid Width="40" Height="40" Margin="0,0,0,5" HorizontalAlignment="Center">
								<Grid.Clip> <!-- used to avoid wrong button areas (negative margins below extend the button area) -->
									<RectangleGeometry Rect="0 0 40 40" />
								</Grid.Clip>
								<TextBlock x:Name="BackgroundGlyph" Text="&#xE0A8;" FontFamily="Segoe UI Symbol" FontSize="53.333" Margin="-4,-19,0,0" Foreground="{StaticResource AppBarItemBackgroundThemeBrush}"/>
								<TextBlock x:Name="OutlineGlyph" Text="&#xE0A7;" FontFamily="Segoe UI Symbol" FontSize="53.333" Margin="-4,-19,0,0"/>
								<ContentPresenter x:Name="Content" HorizontalAlignment="Center" Margin="-1,-1,0,0" VerticalAlignment="Center"/>
							</Grid>
							<TextBlock
                                x:Name="TextLabel"
                                Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Header}"
                                Foreground="{StaticResource AppBarItemForegroundThemeBrush}"
                                Margin="0,0,2,0"
                                FontSize="12"
                                TextAlignment="Center"
                                Width="88"
                                MaxHeight="32"
                                TextTrimming="WordEllipsis"
                                Style="{StaticResource BasicTextStyle}"/>
						</StackPanel>
						<Rectangle
                                x:Name="FocusVisualWhite"
                                IsHitTestVisible="False"
                                Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
                                StrokeEndLineCap="Square"
                                StrokeDashArray="1,1"
                                Opacity="0"
                                StrokeDashOffset="1.5"/>
						<Rectangle
                                x:Name="FocusVisualBlack"
                                IsHitTestVisible="False"
                                Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
                                StrokeEndLineCap="Square"
                                StrokeDashArray="1,1"
                                Opacity="0"
                                StrokeDashOffset="0.5"/>

						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="ApplicationViewStates">
								<VisualState x:Name="FullScreenLandscape"/>
								<VisualState x:Name="Filled"/>
								<VisualState x:Name="FullScreenPortrait">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Width">
											<DiscreteObjectKeyFrame KeyTime="0" Value="60"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Snapped">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Width">
											<DiscreteObjectKeyFrame KeyTime="0" Value="60"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="PointerOver">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPointerOverBackgroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPointerOverForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPressedForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused">
									<Storyboard>
										<DoubleAnimation
                                                Storyboard.TargetName="FocusVisualWhite"
                                                Storyboard.TargetProperty="Opacity"
                                                To="1"
                                                Duration="0"/>
										<DoubleAnimation
                                                Storyboard.TargetName="FocusVisualBlack"
                                                Storyboard.TargetProperty="Opacity"
                                                To="1"
                                                Duration="0"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unfocused" />
								<VisualState x:Name="PointerFocused" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="controls:TextButton">
		<Setter Property="Foreground" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
		<Setter Property="VerticalAlignment" Value="Stretch"/>
		<Setter Property="FontFamily" Value="Segoe UI Symbol"/>
		<Setter Property="FontWeight" Value="Normal"/>
		<Setter Property="FontSize" Value="20"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:TextButton">
					<Grid x:Name="RootGrid" Background="Transparent">
						<StackPanel VerticalAlignment="Top" Margin="0,0,0,0" Orientation="Horizontal">
							<Grid Width="40" Height="40" Margin="0,0,0,0" HorizontalAlignment="Center">
								<Grid.Clip> <!-- used to avoid wrong button areas (negative margins below extend the button area) -->
									<RectangleGeometry Rect="0 0 40 40" />
								</Grid.Clip>
								<TextBlock x:Name="BackgroundGlyph" Text="&#xE0A8;" FontFamily="Segoe UI Symbol" FontSize="53.333" Margin="-3,-19,0,0" 
										   Foreground="{StaticResource AppBarItemBackgroundThemeBrush}"/>
								<TextBlock x:Name="OutlineGlyph" Text="&#xE0A7;" FontFamily="Segoe UI Symbol" FontSize="53.333" Margin="-3,-19,0,0"/>
								<ContentPresenter x:Name="Content" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center"/>
							</Grid>
							<TextBlock
                                x:Name="TextLabel"
                                Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Header}"
                                Foreground="{StaticResource AppBarItemForegroundThemeBrush}"
                                Margin="10,0,0,0"
								Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Header, Converter={StaticResource vc}}"
                                TextAlignment="Center"
                                TextTrimming="WordEllipsis"
                                Style="{StaticResource SubheaderTextStyle}"/>
						</StackPanel>
						<Rectangle
                                x:Name="FocusVisualWhite"
                                IsHitTestVisible="False"
                                Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
                                StrokeEndLineCap="Square"
                                StrokeDashArray="1,1"
                                Opacity="0"
                                StrokeDashOffset="1.5"/>
						<Rectangle
                                x:Name="FocusVisualBlack"
                                IsHitTestVisible="False"
                                Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
                                StrokeEndLineCap="Square"
                                StrokeDashArray="1,1"
                                Opacity="0"
                                StrokeDashOffset="0.5"/>

						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="ApplicationViewStates">
								<VisualState x:Name="FullScreenLandscape"/>
								<VisualState x:Name="Filled"/>
								<VisualState x:Name="FullScreenPortrait">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Width">
											<DiscreteObjectKeyFrame KeyTime="0" Value="60"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Snapped">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Width">
											<DiscreteObjectKeyFrame KeyTime="0" Value="60"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="PointerOver">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPointerOverBackgroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPointerOverForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemPressedForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OutlineGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Content" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TextLabel" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource AppBarItemDisabledForegroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused">
									<Storyboard>
										<DoubleAnimation
                                                Storyboard.TargetName="FocusVisualWhite"
                                                Storyboard.TargetProperty="Opacity"
                                                To="1"
                                                Duration="0"/>
										<DoubleAnimation
                                                Storyboard.TargetName="FocusVisualBlack"
                                                Storyboard.TargetProperty="Opacity"
                                                To="1"
                                                Duration="0"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unfocused" />
								<VisualState x:Name="PointerFocused" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

    <Style TargetType="controls:MenuListBox">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:MenuListBox">
					<Border BorderThickness="2" BorderBrush="#2a2a2a" Background="White">
						<controls:ExtendedItemsControl Margin="0,5,0,5" ItemsSource="{TemplateBinding ItemsSource}" x:Name="items">
							<controls:ExtendedItemsControl.ItemTemplate>
								<DataTemplate>
									<Button VerticalContentAlignment="Stretch" VerticalAlignment="Stretch"
											HorizontalContentAlignment="Stretch" HorizontalAlignment="Stretch" >
										<Button.Template>
											<ControlTemplate>
												<Border Background="White" Height="40" x:Name="border">
													<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0" x:Name="text"
															   Text="{Binding}" FontSize="16" Foreground="Black" FontWeight="SemiBold" />
													<VisualStateManager.VisualStateGroups>
														<VisualStateGroup x:Name="CommonStates">
															<VisualState x:Name="Normal" />
															<VisualState x:Name="PointerOver">
																<Storyboard>
																	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="border">
																		<DiscreteObjectKeyFrame KeyTime="0" Value="#dedede"/>
																	</ObjectAnimationUsingKeyFrames>
																</Storyboard>
															</VisualState>
															<VisualState x:Name="Pressed">
																<Storyboard>
																	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="border">
																		<DiscreteObjectKeyFrame KeyTime="0" Value="Black"/>
																	</ObjectAnimationUsingKeyFrames>
																	<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="text">
																		<DiscreteObjectKeyFrame KeyTime="0" Value="White"/>
																	</ObjectAnimationUsingKeyFrames>
																</Storyboard>
															</VisualState>
														</VisualStateGroup>
													</VisualStateManager.VisualStateGroups>
												</Border>
											</ControlTemplate>
										</Button.Template>
									</Button>
								</DataTemplate>
							</controls:ExtendedItemsControl.ItemTemplate>
						</controls:ExtendedItemsControl>
					</Border>
				</ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

	<Style TargetType="controls:ColorChooser">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:ColorChooser">
					<ComboBox Width="80" ItemsSource="{Binding Colors, RelativeSource={RelativeSource TemplatedParent}}" 
							  SelectedItem="{Binding SelectedColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
						<ComboBox.ItemTemplate>
							<DataTemplate>
								<Border Width="20" Height="20" BorderBrush="Black" BorderThickness="1">
									<Border.Background>
										<SolidColorBrush Color="{Binding}" />
									</Border.Background>
								</Border>
							</DataTemplate>
						</ComboBox.ItemTemplate>
					</ComboBox>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="controls:PanAndZoomViewer">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:PanAndZoomViewer">
					<ContentPresenter x:Name="content">
						<ContentPresenter.RenderTransform>
							<CompositeTransform ScaleX="1" ScaleY="1" TranslateX="0" TranslateY="0"/>
						</ContentPresenter.RenderTransform>
					</ContentPresenter>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style TargetType="controls:PanAndZoomImage">
		<Setter Property="Stretch" Value="UniformToFill"/>
		<Setter Property="Background" Value="Gray" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:PanAndZoomImage">
					<ContentPresenter x:Name="content">
						<ContentPresenter.RenderTransform>
							<CompositeTransform ScaleX="1" ScaleY="1" TranslateX="0" TranslateY="0"/>
						</ContentPresenter.RenderTransform>

						<Border Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background}" 
								Margin="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerMargin}">
							<Image Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Source}" 
								   Stretch="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Stretch}" 
								   x:Name="image">
							</Image>
						</Border>
					</ContentPresenter>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="SettingsBackButtonStyle" TargetType="Button">
		<Setter Property="MinWidth" Value="0"/>
		<Setter Property="FontFamily" Value="Segoe UI Symbol"/>
		<Setter Property="FontWeight" Value="Normal"/>
		<Setter Property="FontSize" Value="26.66667"/>
		<Setter Property="AutomationProperties.AutomationId" Value="BackButton"/>
		<Setter Property="AutomationProperties.Name" Value="Back"/>
		<Setter Property="AutomationProperties.ItemType" Value="Navigation Button"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Button">
					<Grid x:Name="RootGrid" Width="30" Height="30">
						<Grid Margin="-6,-6,0,0">
							<TextBlock x:Name="BackgroundGlyph" Text="&#xE0D4;" Foreground="Transparent"/>
							<TextBlock x:Name="NormalGlyph" Text="{StaticResource BackButtonSnappedGlyph}" Foreground="White"/>
							<TextBlock x:Name="ArrowGlyph" Text="&#xE0C4;" Foreground="#00b2f0" Opacity="0"/>
						</Grid>
						<Rectangle
                                x:Name="FocusVisualWhite"
                                IsHitTestVisible="False"
                                Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" 
                                StrokeEndLineCap="Square"
                                StrokeDashArray="1,1"
                                Opacity="0"
                                StrokeDashOffset="1.5"
                                />

						<Rectangle
                                x:Name="FocusVisualBlack"
                                IsHitTestVisible="False"
                                Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" 
                                StrokeEndLineCap="Square"
                                StrokeDashArray="1,1"
                                Opacity="0"
                                StrokeDashOffset="0.5"
                                />

						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal" />
								<VisualState x:Name="PointerOver">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource BackButtonPointerOverBackgroundThemeBrush}"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGlyph" Storyboard.TargetProperty="Foreground">
											<DiscreteObjectKeyFrame KeyTime="0" Value="White"/>
										</ObjectAnimationUsingKeyFrames>
										<DoubleAnimation
                                            Storyboard.TargetName="ArrowGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0"/>
										<DoubleAnimation
                                            Storyboard.TargetName="NormalGlyph"
                                            Storyboard.TargetProperty="Opacity"
                                            To="0"
                                            Duration="0"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Visibility">
											<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
										</ObjectAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
							<VisualStateGroup x:Name="FocusStates">
								<VisualState x:Name="Focused">
									<Storyboard>
										<DoubleAnimation
                                            Storyboard.TargetName="FocusVisualWhite"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0"/>
										<DoubleAnimation
                                            Storyboard.TargetName="FocusVisualBlack"
                                            Storyboard.TargetProperty="Opacity"
                                            To="1"
                                            Duration="0"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Unfocused" />
								<VisualState x:Name="PointerFocused" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<!--<Style TargetType="controls:SettingsHeader">
        <Setter Property="Template">
            <Setter.Value>
				<ControlTemplate TargetType="controls:SettingsHeader">
					<Border Background="#1B143B">
						<StackPanel Orientation="Horizontal" Margin="40, 32, 17, 13">
							<Button x:Name="button" Margin="0,3,0,0" Style="{StaticResource SettingsBackButtonStyle}"/>
							<TextBlock Margin="10,0,0,0" FontFamily="Segoe UI" FontWeight="SemiLight" 
								   FontSize="24.6667" Text="{TemplateBinding Header}" Foreground="White"/>
						</StackPanel>
					</Border>
				</ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>-->

    <!--<Style TargetType="controls:ValidatedTextBox">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:ValidatedTextBox">
                    <StackPanel>
						<TextBlock Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Header, Converter={StaticResource vc}}" 
								   Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Header}"
								   Style="{StaticResource BasicTextStyle}" Margin="0,0,0,5" FontWeight="Bold" />
						<TextBox Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
						<TextBlock Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ValidationException, Converter={StaticResource vc}}" 
								   Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ValidationException.Message}"
								   Foreground="Red" Style="{StaticResource BasicTextStyle}" Margin="0,5,0,0" />
					</StackPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>-->
</ResourceDictionary>
  
